﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace GiaoTrinhEPU.Repositories.DataModels
{
    public class SyllabusAuthorModel
    {
         public List<string> Authors { get; set; }
        public MultiSelectList AuthorModelList { get; private set; }

        public SyllabusAuthorModel()
        {
            this.AuthorModelList = GetAuthors(null);
        }

        public MultiSelectList GetAuthors(string[] selectedValues) {
            List<AuthorModel> authors = new List<AuthorModel>()
                {
                    new AuthorModel() { Id = 1, Name= "United States" },
                    new AuthorModel() { Id = 2, Name= "Canada" },
                    new AuthorModel() { Id = 3, Name= "UK" },
                    new AuthorModel() { Id = 4, Name= "China" },
                    new AuthorModel() { Id = 5, Name= "Japan" },
                    new AuthorModel() { Id = 6, Name= "France" },
                    new AuthorModel() { Id = 7, Name= "India" },
                    new AuthorModel() { Id = 8, Name= "South Korea" },
                };

            return new MultiSelectList(authors, "ID", "Name", selectedValues);
        }
    }
}
